function TextView(model, styler){
    this.$initEventable();
    this.$initRenderable();
    this._model = model;
    this._pModel = new ProjectionTextModel(this._model);
    this._layout = new TextLayout(this._pModel);
    this._renderer = new TextRenderer(this._layout, this._styler);
    this._readOnly = false;
    this._rulers = [];
}

TextView.prototype = {
    getModel: function (){
        return this._model;
    },
    getProjectionModel: function (){
        return this._pModel;
    },
    setTabStop: function (stop){
        this._layout.setTabStop(stop);
    },
    addRuler: function (ruler){
        this._rulers.push(ruler);
    }
};

Utils.extend(TextView, Eventable);
Utils.extend(TextView, Renderable);